FROM centos:7.9.2009

MAINTAINER zhangyw<xxx@163.com>

RUN set -x && \
    yum -y install --setopt=protected_multilib=false libgssapi_krb5.so.2 libxml2.so.2 libstdc++.so.5 && \
    yum -y install --setopt=protected_multilib=false xulrunner.i686 xulrunner-devel.i686 && \
    yum -y install --setopt=protected_multilib=false glibc.i686 && \
    yum clean all && \
    ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' > /etc/timezone

ENV BASE_DIR "/zxserver"
ENV LD_LIBRARY_PATH $BASE_DIR/lib

RUN mkdir -p $BASE_DIR && \ 
    mkdir -p $BASE_DIR/logs
WORKDIR $BASE_DIR

ADD ./etc/cert.jks /etc/
ADD ./bin ./bin
ADD ./zxserver/lib ./lib
ADD ./zxserver/gacd ./gacd
ADD ./zxserver/gdeliveryd ./gdeliveryd
ADD ./zxserver/gamed ./gamed
ADD ./zxserver/glinkd ./glinkd

# 复制配置
COPY ./config/gacd/gamesys.conf ./gacd/gamesys.conf
COPY ./config/gamed/gmserver.conf ./gamed/gmserver.conf
COPY ./config/gdeliveryd/gamesys.conf ./gdeliveryd/gamesys.conf
COPY ./config/glinkd/gamesys.conf ./glinkd/gamesys.conf

# 29200 auth 29206 vip 29000 link
EXPOSE 29000 29100

CMD ["/bin/sh","-c", "./bin/start-gser.sh && tail -f /dev/null"]
